<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: coap_session.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('coap__session_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">coap_session.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="coap__io_8h_source.html">coap_io.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__time_8h_source.html">coap_time.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pdu_8h_source.html">pdu.h</a>&quot;</code><br />
</div>
<p><a href="coap__session_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstraction of a fixed point number that can be used where necessary instead of a float.  <a href="structcoap__fixed__point__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcoap__session__t.html">coap_session_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstraction of virtual endpoint that can be attached to <a class="el" href="structcoap__context__t.html" title="The CoAP stack&#39;s global state is stored in a coap_context_t object.">coap_context_t</a>.  <a href="structcoap__endpoint__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aeffe4ca864ff11a3d837735a38f3ca9e" id="r_aeffe4ca864ff11a3d837735a38f3ca9e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aeffe4ca864ff11a3d837735a38f3ca9e">COAP_DEFAULT_SESSION_TIMEOUT</a>&#160;&#160;&#160;300</td></tr>
<tr class="separator:aeffe4ca864ff11a3d837735a38f3ca9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cadcca6c49ce5b24e3a986944d10536" id="r_a1cadcca6c49ce5b24e3a986944d10536"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a1cadcca6c49ce5b24e3a986944d10536">COAP_PARTIAL_SESSION_TIMEOUT_TICKS</a>&#160;&#160;&#160;(30 * <a class="el" href="group__clock.html#gabf672e8aaf725f9ccbc4fc0aa202a5bb">COAP_TICKS_PER_SECOND</a>)</td></tr>
<tr class="separator:a1cadcca6c49ce5b24e3a986944d10536"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4deedbe5463ff6e3c86b0bc1a514da4a" id="r_a4deedbe5463ff6e3c86b0bc1a514da4a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a4deedbe5463ff6e3c86b0bc1a514da4a">COAP_DEFAULT_MAX_HANDSHAKE_SESSIONS</a>&#160;&#160;&#160;100</td></tr>
<tr class="separator:a4deedbe5463ff6e3c86b0bc1a514da4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66dad7e75beba98bd59b096adbe39c35" id="r_a66dad7e75beba98bd59b096adbe39c35"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a66dad7e75beba98bd59b096adbe39c35">COAP_PROTO_NOT_RELIABLE</a>(p)&#160;&#160;&#160;((p)==<a class="el" href="pdu_8h.html#aeda5d0dcadd6cbb8c13e1950fcff787a">COAP_PROTO_UDP</a> || (p)==<a class="el" href="pdu_8h.html#ac10ea7ae66e5e549b47854417311b560">COAP_PROTO_DTLS</a>)</td></tr>
<tr class="separator:a66dad7e75beba98bd59b096adbe39c35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7de76e6002dd8d1ca53f3302e4e33d21" id="r_a7de76e6002dd8d1ca53f3302e4e33d21"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a7de76e6002dd8d1ca53f3302e4e33d21">COAP_PROTO_RELIABLE</a>(p)&#160;&#160;&#160;((p)==<a class="el" href="pdu_8h.html#a1dd5fe6cc335ea31d49f3eb469a5990a">COAP_PROTO_TCP</a> || (p)==<a class="el" href="pdu_8h.html#a6c9a1dd7b311e5a420e3a7c36b918a02">COAP_PROTO_TLS</a>)</td></tr>
<tr class="separator:a7de76e6002dd8d1ca53f3302e4e33d21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59e828e545b6ad57ef4d00c1891d45f3" id="r_a59e828e545b6ad57ef4d00c1891d45f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a59e828e545b6ad57ef4d00c1891d45f3">COAP_SESSION_TYPE_CLIENT</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:a59e828e545b6ad57ef4d00c1891d45f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">coap_session_type_t values  <br /></td></tr>
<tr class="separator:a59e828e545b6ad57ef4d00c1891d45f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab50d7afcf477cbc7578a919c7b438d2a" id="r_ab50d7afcf477cbc7578a919c7b438d2a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ab50d7afcf477cbc7578a919c7b438d2a">COAP_SESSION_TYPE_SERVER</a>&#160;&#160;&#160;2</td></tr>
<tr class="memdesc:ab50d7afcf477cbc7578a919c7b438d2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">server-side  <br /></td></tr>
<tr class="separator:ab50d7afcf477cbc7578a919c7b438d2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f0ed55aa093f7c31ce220de378f15a1" id="r_a5f0ed55aa093f7c31ce220de378f15a1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a5f0ed55aa093f7c31ce220de378f15a1">COAP_SESSION_TYPE_HELLO</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:a5f0ed55aa093f7c31ce220de378f15a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">server-side ephemeral session for responding to a client hello  <br /></td></tr>
<tr class="separator:a5f0ed55aa093f7c31ce220de378f15a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a92a2707bab8b00c7adc43291b587c0" id="r_a8a92a2707bab8b00c7adc43291b587c0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a8a92a2707bab8b00c7adc43291b587c0">COAP_SESSION_STATE_NONE</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a8a92a2707bab8b00c7adc43291b587c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">coap_session_state_t values  <br /></td></tr>
<tr class="separator:a8a92a2707bab8b00c7adc43291b587c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7197e71853281bff72e84261018f81d6" id="r_a7197e71853281bff72e84261018f81d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a7197e71853281bff72e84261018f81d6">COAP_SESSION_STATE_CONNECTING</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a7197e71853281bff72e84261018f81d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b04568c8db8bcced69f14b813805b7f" id="r_a3b04568c8db8bcced69f14b813805b7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a3b04568c8db8bcced69f14b813805b7f">COAP_SESSION_STATE_HANDSHAKE</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a3b04568c8db8bcced69f14b813805b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a444a82f20628438269ebd418c4bdbe5f" id="r_a444a82f20628438269ebd418c4bdbe5f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a444a82f20628438269ebd418c4bdbe5f">COAP_SESSION_STATE_CSM</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:a444a82f20628438269ebd418c4bdbe5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a954b835ecd156cde63fee7d5f279ab32" id="r_a954b835ecd156cde63fee7d5f279ab32"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a954b835ecd156cde63fee7d5f279ab32">COAP_SESSION_STATE_ESTABLISHED</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:a954b835ecd156cde63fee7d5f279ab32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94c99a6160d08f8c3b79a1c31b712ea0" id="r_ga94c99a6160d08f8c3b79a1c31b712ea0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cc.html#ga94c99a6160d08f8c3b79a1c31b712ea0">COAP_DEFAULT_ACK_TIMEOUT</a>&#160;&#160;&#160;((<a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>){2,0})</td></tr>
<tr class="memdesc:ga94c99a6160d08f8c3b79a1c31b712ea0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of seconds when to expect an ACK or a response to an outstanding CON message.  <br /></td></tr>
<tr class="separator:ga94c99a6160d08f8c3b79a1c31b712ea0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4fcd70b1558aeb7fea1cd734a53589e0" id="r_ga4fcd70b1558aeb7fea1cd734a53589e0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cc.html#ga4fcd70b1558aeb7fea1cd734a53589e0">COAP_DEFAULT_ACK_RANDOM_FACTOR</a>&#160;&#160;&#160;((<a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>){1,500})</td></tr>
<tr class="memdesc:ga4fcd70b1558aeb7fea1cd734a53589e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.  <br /></td></tr>
<tr class="separator:ga4fcd70b1558aeb7fea1cd734a53589e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7574b8b96be63292723bab49f11386bc" id="r_ga7574b8b96be63292723bab49f11386bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cc.html#ga7574b8b96be63292723bab49f11386bc">COAP_DEFAULT_MAX_RETRANSMIT</a>&#160;&#160;&#160;4</td></tr>
<tr class="memdesc:ga7574b8b96be63292723bab49f11386bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of message retransmissions before message sending is stopped RFC 7252, Section 4.8 Default value of MAX_RETRANSMIT is 4.  <br /></td></tr>
<tr class="separator:ga7574b8b96be63292723bab49f11386bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d5bcf0eaa2f8b5d0c8f0c7b0e76aac9" id="r_ga9d5bcf0eaa2f8b5d0c8f0c7b0e76aac9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cc.html#ga9d5bcf0eaa2f8b5d0c8f0c7b0e76aac9">COAP_DEFAULT_NSTART</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:ga9d5bcf0eaa2f8b5d0c8f0c7b0e76aac9"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of simultaneous outstanding interactions that a client maintains to a given server.  <br /></td></tr>
<tr class="separator:ga9d5bcf0eaa2f8b5d0c8f0c7b0e76aac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:adcf5a0f77e8cd6b89b2baebaec916329" id="r_adcf5a0f77e8cd6b89b2baebaec916329"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#adcf5a0f77e8cd6b89b2baebaec916329">coap_fixed_point_t</a></td></tr>
<tr class="memdesc:adcf5a0f77e8cd6b89b2baebaec916329"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstraction of a fixed point number that can be used where necessary instead of a float.  <br /></td></tr>
<tr class="separator:adcf5a0f77e8cd6b89b2baebaec916329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53c0f7c2c9ea53e2abc29d308337d4a5" id="r_a53c0f7c2c9ea53e2abc29d308337d4a5"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a53c0f7c2c9ea53e2abc29d308337d4a5">coap_session_type_t</a></td></tr>
<tr class="separator:a53c0f7c2c9ea53e2abc29d308337d4a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e23bae819060da9cb76d8fc8aae9001" id="r_a3e23bae819060da9cb76d8fc8aae9001"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a3e23bae819060da9cb76d8fc8aae9001">coap_session_state_t</a></td></tr>
<tr class="separator:a3e23bae819060da9cb76d8fc8aae9001"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5c4a858734924c24e43abbb988446aa" id="r_ae5c4a858734924c24e43abbb988446aa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structcoap__session__t.html">coap_session_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ae5c4a858734924c24e43abbb988446aa">coap_session_t</a></td></tr>
<tr class="separator:ae5c4a858734924c24e43abbb988446aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a470c6a3975a7b4ac44f25e8fe44d805a" id="r_a470c6a3975a7b4ac44f25e8fe44d805a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a470c6a3975a7b4ac44f25e8fe44d805a">coap_endpoint_t</a></td></tr>
<tr class="memdesc:a470c6a3975a7b4ac44f25e8fe44d805a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abstraction of virtual endpoint that can be attached to <a class="el" href="structcoap__context__t.html" title="The CoAP stack&#39;s global state is stored in a coap_context_t object.">coap_context_t</a>.  <br /></td></tr>
<tr class="separator:a470c6a3975a7b4ac44f25e8fe44d805a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae37bac62f8de2cecd968ec1c26eb23b4" id="r_ae37bac62f8de2cecd968ec1c26eb23b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ae37bac62f8de2cecd968ec1c26eb23b4">coap_session_reference</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ae37bac62f8de2cecd968ec1c26eb23b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment reference counter on a session.  <br /></td></tr>
<tr class="separator:ae37bac62f8de2cecd968ec1c26eb23b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aee135ba884d7c143b11bc42fd23e53" id="r_a9aee135ba884d7c143b11bc42fd23e53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a9aee135ba884d7c143b11bc42fd23e53">coap_session_release</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a9aee135ba884d7c143b11bc42fd23e53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrement reference counter on a session.  <br /></td></tr>
<tr class="separator:a9aee135ba884d7c143b11bc42fd23e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99e20f56b02256dc352cc48bdc04b778" id="r_a99e20f56b02256dc352cc48bdc04b778"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a99e20f56b02256dc352cc48bdc04b778">coap_session_set_app_data</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, void *data)</td></tr>
<tr class="memdesc:a99e20f56b02256dc352cc48bdc04b778"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores <code>data</code> with the given session.  <br /></td></tr>
<tr class="separator:a99e20f56b02256dc352cc48bdc04b778"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaa81c523bab1519c3df5b06e7931f66" id="r_afaa81c523bab1519c3df5b06e7931f66"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#afaa81c523bab1519c3df5b06e7931f66">coap_session_get_app_data</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:afaa81c523bab1519c3df5b06e7931f66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns any application-specific data that has been stored with <code>session</code> using the function <a class="el" href="coap__session_8h.html#a99e20f56b02256dc352cc48bdc04b778" title="Stores data with the given session.">coap_session_set_app_data()</a>.  <br /></td></tr>
<tr class="separator:afaa81c523bab1519c3df5b06e7931f66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3377d3198c10fa086502035ded9c268" id="r_ad3377d3198c10fa086502035ded9c268"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ad3377d3198c10fa086502035ded9c268">coap_session_disconnected</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a> reason)</td></tr>
<tr class="memdesc:ad3377d3198c10fa086502035ded9c268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session that it has failed.  <br /></td></tr>
<tr class="separator:ad3377d3198c10fa086502035ded9c268"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f455ec1572982a5ae404beac0cfbd53" id="r_a2f455ec1572982a5ae404beac0cfbd53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a2f455ec1572982a5ae404beac0cfbd53">coap_session_send_csm</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a2f455ec1572982a5ae404beac0cfbd53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session transport has just connected and CSM exchange can now start.  <br /></td></tr>
<tr class="separator:a2f455ec1572982a5ae404beac0cfbd53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8b3a2da8480911b0216dad076038cb6" id="r_aa8b3a2da8480911b0216dad076038cb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aa8b3a2da8480911b0216dad076038cb6">coap_session_connected</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:aa8b3a2da8480911b0216dad076038cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session that it has just connected or reconnected.  <br /></td></tr>
<tr class="separator:aa8b3a2da8480911b0216dad076038cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23671937b7c384fb768ccd00cc39db45" id="r_a23671937b7c384fb768ccd00cc39db45"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a23671937b7c384fb768ccd00cc39db45">coap_session_set_mtu</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, unsigned mtu)</td></tr>
<tr class="memdesc:a23671937b7c384fb768ccd00cc39db45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the session MTU.  <br /></td></tr>
<tr class="separator:a23671937b7c384fb768ccd00cc39db45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4368ee622c681bf7cf0b7cfe99c8ab37" id="r_a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a4368ee622c681bf7cf0b7cfe99c8ab37">coap_session_max_pdu_size</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get maximum acceptable PDU size.  <br /></td></tr>
<tr class="separator:a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27368ba92c60da1c501408477b86735e" id="r_a27368ba92c60da1c501408477b86735e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a27368ba92c60da1c501408477b86735e">coap_new_client_session</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:a27368ba92c60da1c501408477b86735e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server.  <br /></td></tr>
<tr class="separator:a27368ba92c60da1c501408477b86735e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaad2073b08052ead81502b708d1c3df3" id="r_aaad2073b08052ead81502b708d1c3df3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aaad2073b08052ead81502b708d1c3df3">coap_new_client_session_psk</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, const char *identity, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *key, unsigned key_len)</td></tr>
<tr class="memdesc:aaad2073b08052ead81502b708d1c3df3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server with PSK credentials.  <br /></td></tr>
<tr class="separator:aaad2073b08052ead81502b708d1c3df3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab88c1006da3287ef11ce5ecb249de1a" id="r_aab88c1006da3287ef11ce5ecb249de1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aab88c1006da3287ef11ce5ecb249de1a">coap_new_client_session_pki</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, struct <a class="el" href="structcoap__dtls__pki__t.html">coap_dtls_pki_t</a> *setup_data)</td></tr>
<tr class="memdesc:aab88c1006da3287ef11ce5ecb249de1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server with PKI credentials.  <br /></td></tr>
<tr class="separator:aab88c1006da3287ef11ce5ecb249de1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aab9b027be5f2ab6858c5fd45d5903e" id="r_a0aab9b027be5f2ab6858c5fd45d5903e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a0aab9b027be5f2ab6858c5fd45d5903e">coap_new_server_session</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, struct <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep)</td></tr>
<tr class="memdesc:a0aab9b027be5f2ab6858c5fd45d5903e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new server session for the specified endpoint.  <br /></td></tr>
<tr class="separator:a0aab9b027be5f2ab6858c5fd45d5903e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43ad12697cacde3be9579f8253ca9ccf" id="r_a43ad12697cacde3be9579f8253ca9ccf"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a43ad12697cacde3be9579f8253ca9ccf">coap_session_send</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t datalen)</td></tr>
<tr class="memdesc:a43ad12697cacde3be9579f8253ca9ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function interface for datagram data transmission.  <br /></td></tr>
<tr class="separator:a43ad12697cacde3be9579f8253ca9ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb19e1f2544b8b01424fa2e9dce41e7b" id="r_adb19e1f2544b8b01424fa2e9dce41e7b"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#adb19e1f2544b8b01424fa2e9dce41e7b">coap_session_write</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t datalen)</td></tr>
<tr class="memdesc:adb19e1f2544b8b01424fa2e9dce41e7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function interface for stream data transmission.  <br /></td></tr>
<tr class="separator:adb19e1f2544b8b01424fa2e9dce41e7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf20c9b0b2ad3168c15e535a67ea3ce5" id="r_aaf20c9b0b2ad3168c15e535a67ea3ce5"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aaf20c9b0b2ad3168c15e535a67ea3ce5">coap_session_send_pdu</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu)</td></tr>
<tr class="memdesc:aaf20c9b0b2ad3168c15e535a67ea3ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a pdu according to the session's protocol.  <br /></td></tr>
<tr class="separator:aaf20c9b0b2ad3168c15e535a67ea3ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf09c67f27059ca278900e7e8fdd475e" id="r_gabf09c67f27059ca278900e7e8fdd475e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__logging.html#gabf09c67f27059ca278900e7e8fdd475e">coap_session_str</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:gabf09c67f27059ca278900e7e8fdd475e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get session description.  <br /></td></tr>
<tr class="separator:gabf09c67f27059ca278900e7e8fdd475e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bbb4153c8efc0a5425990e24a541c5e" id="r_a0bbb4153c8efc0a5425990e24a541c5e"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a0bbb4153c8efc0a5425990e24a541c5e">coap_session_delay_pdu</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, struct <a class="el" href="structcoap__queue__t.html">coap_queue_t</a> *node)</td></tr>
<tr class="separator:a0bbb4153c8efc0a5425990e24a541c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05cb8f588768de5cabb83840c63ad746" id="r_a05cb8f588768de5cabb83840c63ad746"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a05cb8f588768de5cabb83840c63ad746">coap_new_endpoint</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *listen_addr, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:a05cb8f588768de5cabb83840c63ad746"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new endpoint for communicating with peers.  <br /></td></tr>
<tr class="separator:a05cb8f588768de5cabb83840c63ad746"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0e097f62e746144d8224a63678d14f4" id="r_aa0e097f62e746144d8224a63678d14f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#aa0e097f62e746144d8224a63678d14f4">coap_endpoint_set_default_mtu</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint, unsigned mtu)</td></tr>
<tr class="memdesc:aa0e097f62e746144d8224a63678d14f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the endpoint's default MTU.  <br /></td></tr>
<tr class="separator:aa0e097f62e746144d8224a63678d14f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a157d58fe7840d7d7e36c40fff0825674" id="r_a157d58fe7840d7d7e36c40fff0825674"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a157d58fe7840d7d7e36c40fff0825674">coap_free_endpoint</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep)</td></tr>
<tr class="separator:a157d58fe7840d7d7e36c40fff0825674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab3c752e5438040817ca0df50ceaf162" id="r_gaab3c752e5438040817ca0df50ceaf162"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__logging.html#gaab3c752e5438040817ca0df50ceaf162">coap_endpoint_str</a> (const <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint)</td></tr>
<tr class="memdesc:gaab3c752e5438040817ca0df50ceaf162"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get endpoint description.  <br /></td></tr>
<tr class="separator:gaab3c752e5438040817ca0df50ceaf162"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5332dde6300b189c007c2cfc7548de5" id="r_ad5332dde6300b189c007c2cfc7548de5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ad5332dde6300b189c007c2cfc7548de5">coap_endpoint_get_session</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint, const struct <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *packet, <a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a> now)</td></tr>
<tr class="memdesc:ad5332dde6300b189c007c2cfc7548de5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lookup the server session for the packet received on an endpoint, or create a new one.  <br /></td></tr>
<tr class="separator:ad5332dde6300b189c007c2cfc7548de5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0caf72509389aca217add5fbaa125f52" id="r_ga0caf72509389aca217add5fbaa125f52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dtls__internal.html#ga0caf72509389aca217add5fbaa125f52">coap_endpoint_new_dtls_session</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint, const struct <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *packet, <a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a> now)</td></tr>
<tr class="memdesc:ga0caf72509389aca217add5fbaa125f52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new DTLS session for the <code>endpoint</code>.  <br /></td></tr>
<tr class="separator:ga0caf72509389aca217add5fbaa125f52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ad5e9a06810ee45664f88ab6523357c" id="r_a7ad5e9a06810ee45664f88ab6523357c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a7ad5e9a06810ee45664f88ab6523357c">coap_session_get_by_peer</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const struct <a class="el" href="structcoap__address__t.html">coap_address_t</a> *remote_addr, int ifindex)</td></tr>
<tr class="separator:a7ad5e9a06810ee45664f88ab6523357c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3d24595515d6f66805791a7f821d5e7" id="r_ab3d24595515d6f66805791a7f821d5e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ab3d24595515d6f66805791a7f821d5e7">coap_session_free</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:ab3d24595515d6f66805791a7f821d5e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab91ca670624ee770714727efff274c49" id="r_ab91ca670624ee770714727efff274c49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ab91ca670624ee770714727efff274c49">coap_session_mfree</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:ab91ca670624ee770714727efff274c49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0292e90d1449f26885194c9efb7d3a27" id="r_a0292e90d1449f26885194c9efb7d3a27"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a0292e90d1449f26885194c9efb7d3a27">coap_session_set_max_retransmit</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, unsigned int value)</td></tr>
<tr class="memdesc:a0292e90d1449f26885194c9efb7d3a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP maximum retransmit count before failure.  <br /></td></tr>
<tr class="separator:a0292e90d1449f26885194c9efb7d3a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b9cd625815481afa130fa086362dfe1" id="r_a9b9cd625815481afa130fa086362dfe1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a9b9cd625815481afa130fa086362dfe1">coap_session_set_ack_timeout</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> value)</td></tr>
<tr class="memdesc:a9b9cd625815481afa130fa086362dfe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP initial ack response timeout before the next re-transmit.  <br /></td></tr>
<tr class="separator:a9b9cd625815481afa130fa086362dfe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45feb3b133d2673839723a8ecf6d547c" id="r_a45feb3b133d2673839723a8ecf6d547c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a45feb3b133d2673839723a8ecf6d547c">coap_session_set_ack_random_factor</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> value)</td></tr>
<tr class="memdesc:a45feb3b133d2673839723a8ecf6d547c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP ack randomize factor.  <br /></td></tr>
<tr class="separator:a45feb3b133d2673839723a8ecf6d547c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495176d2531e846c1cda3961119df1c0" id="r_a495176d2531e846c1cda3961119df1c0"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a495176d2531e846c1cda3961119df1c0">coap_session_get_max_transmit</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a495176d2531e846c1cda3961119df1c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP maximum retransmit before failure.  <br /></td></tr>
<tr class="separator:a495176d2531e846c1cda3961119df1c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b7b3b2cc65d0f9f4affbfa76aaf6dac" id="r_a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#a9b7b3b2cc65d0f9f4affbfa76aaf6dac">coap_session_get_ack_timeout</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP initial ack response timeout before the next re-transmit.  <br /></td></tr>
<tr class="separator:a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9d572f48de8c2d3158222102221ddfe" id="r_ae9d572f48de8c2d3158222102221ddfe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ae9d572f48de8c2d3158222102221ddfe">coap_session_get_ack_random_factor</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ae9d572f48de8c2d3158222102221ddfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP ack randomize factor.  <br /></td></tr>
<tr class="separator:ae9d572f48de8c2d3158222102221ddfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3f9f60c0a4857c147fef5721025944c" id="r_ab3f9f60c0a4857c147fef5721025944c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8h.html#ab3f9f60c0a4857c147fef5721025944c">coap_session_send_ping</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ab3f9f60c0a4857c147fef5721025944c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a ping message for the session.  <br /></td></tr>
<tr class="separator:ab3f9f60c0a4857c147fef5721025944c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a4deedbe5463ff6e3c86b0bc1a514da4a" name="a4deedbe5463ff6e3c86b0bc1a514da4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4deedbe5463ff6e3c86b0bc1a514da4a">&#9670;&#160;</a></span>COAP_DEFAULT_MAX_HANDSHAKE_SESSIONS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_DEFAULT_MAX_HANDSHAKE_SESSIONS&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00033">33</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="aeffe4ca864ff11a3d837735a38f3ca9e" name="aeffe4ca864ff11a3d837735a38f3ca9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeffe4ca864ff11a3d837735a38f3ca9e">&#9670;&#160;</a></span>COAP_DEFAULT_SESSION_TIMEOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_DEFAULT_SESSION_TIMEOUT&#160;&#160;&#160;300</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00031">31</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a1cadcca6c49ce5b24e3a986944d10536" name="a1cadcca6c49ce5b24e3a986944d10536"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cadcca6c49ce5b24e3a986944d10536">&#9670;&#160;</a></span>COAP_PARTIAL_SESSION_TIMEOUT_TICKS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_PARTIAL_SESSION_TIMEOUT_TICKS&#160;&#160;&#160;(30 * <a class="el" href="group__clock.html#gabf672e8aaf725f9ccbc4fc0aa202a5bb">COAP_TICKS_PER_SECOND</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00032">32</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a66dad7e75beba98bd59b096adbe39c35" name="a66dad7e75beba98bd59b096adbe39c35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66dad7e75beba98bd59b096adbe39c35">&#9670;&#160;</a></span>COAP_PROTO_NOT_RELIABLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_PROTO_NOT_RELIABLE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">p</td><td>)</td>
          <td>&#160;&#160;&#160;((p)==<a class="el" href="pdu_8h.html#aeda5d0dcadd6cbb8c13e1950fcff787a">COAP_PROTO_UDP</a> || (p)==<a class="el" href="pdu_8h.html#ac10ea7ae66e5e549b47854417311b560">COAP_PROTO_DTLS</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00035">35</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a7de76e6002dd8d1ca53f3302e4e33d21" name="a7de76e6002dd8d1ca53f3302e4e33d21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7de76e6002dd8d1ca53f3302e4e33d21">&#9670;&#160;</a></span>COAP_PROTO_RELIABLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_PROTO_RELIABLE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">p</td><td>)</td>
          <td>&#160;&#160;&#160;((p)==<a class="el" href="pdu_8h.html#a1dd5fe6cc335ea31d49f3eb469a5990a">COAP_PROTO_TCP</a> || (p)==<a class="el" href="pdu_8h.html#a6c9a1dd7b311e5a420e3a7c36b918a02">COAP_PROTO_TLS</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00036">36</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a7197e71853281bff72e84261018f81d6" name="a7197e71853281bff72e84261018f81d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7197e71853281bff72e84261018f81d6">&#9670;&#160;</a></span>COAP_SESSION_STATE_CONNECTING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_STATE_CONNECTING&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00051">51</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a444a82f20628438269ebd418c4bdbe5f" name="a444a82f20628438269ebd418c4bdbe5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a444a82f20628438269ebd418c4bdbe5f">&#9670;&#160;</a></span>COAP_SESSION_STATE_CSM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_STATE_CSM&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00053">53</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a954b835ecd156cde63fee7d5f279ab32" name="a954b835ecd156cde63fee7d5f279ab32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a954b835ecd156cde63fee7d5f279ab32">&#9670;&#160;</a></span>COAP_SESSION_STATE_ESTABLISHED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_STATE_ESTABLISHED&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00054">54</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a3b04568c8db8bcced69f14b813805b7f" name="a3b04568c8db8bcced69f14b813805b7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b04568c8db8bcced69f14b813805b7f">&#9670;&#160;</a></span>COAP_SESSION_STATE_HANDSHAKE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_STATE_HANDSHAKE&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00052">52</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a8a92a2707bab8b00c7adc43291b587c0" name="a8a92a2707bab8b00c7adc43291b587c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a92a2707bab8b00c7adc43291b587c0">&#9670;&#160;</a></span>COAP_SESSION_STATE_NONE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_STATE_NONE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>coap_session_state_t values </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00050">50</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a59e828e545b6ad57ef4d00c1891d45f3" name="a59e828e545b6ad57ef4d00c1891d45f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59e828e545b6ad57ef4d00c1891d45f3">&#9670;&#160;</a></span>COAP_SESSION_TYPE_CLIENT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_TYPE_CLIENT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>coap_session_type_t values </p>
<p>client-side </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00042">42</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="a5f0ed55aa093f7c31ce220de378f15a1" name="a5f0ed55aa093f7c31ce220de378f15a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f0ed55aa093f7c31ce220de378f15a1">&#9670;&#160;</a></span>COAP_SESSION_TYPE_HELLO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_TYPE_HELLO&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>server-side ephemeral session for responding to a client hello </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00044">44</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="ab50d7afcf477cbc7578a919c7b438d2a" name="ab50d7afcf477cbc7578a919c7b438d2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab50d7afcf477cbc7578a919c7b438d2a">&#9670;&#160;</a></span>COAP_SESSION_TYPE_SERVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_TYPE_SERVER&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>server-side </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00043">43</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a470c6a3975a7b4ac44f25e8fe44d805a" name="a470c6a3975a7b4ac44f25e8fe44d805a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a470c6a3975a7b4ac44f25e8fe44d805a">&#9670;&#160;</a></span>coap_endpoint_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abstraction of virtual endpoint that can be attached to <a class="el" href="structcoap__context__t.html" title="The CoAP stack&#39;s global state is stored in a coap_context_t object.">coap_context_t</a>. </p>
<p>The tuple (handle, addr) must uniquely identify this endpoint. </p>

</div>
</div>
<a id="adcf5a0f77e8cd6b89b2baebaec916329" name="adcf5a0f77e8cd6b89b2baebaec916329"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcf5a0f77e8cd6b89b2baebaec916329">&#9670;&#160;</a></span>coap_fixed_point_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abstraction of a fixed point number that can be used where necessary instead of a float. </p>
<p>1,000 fractional bits equals one integer </p>

</div>
</div>
<a id="a3e23bae819060da9cb76d8fc8aae9001" name="a3e23bae819060da9cb76d8fc8aae9001"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e23bae819060da9cb76d8fc8aae9001">&#9670;&#160;</a></span>coap_session_state_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="coap__session_8h.html#a3e23bae819060da9cb76d8fc8aae9001">coap_session_state_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00046">46</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<a id="ae5c4a858734924c24e43abbb988446aa" name="ae5c4a858734924c24e43abbb988446aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5c4a858734924c24e43abbb988446aa">&#9670;&#160;</a></span>coap_session_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structcoap__session__t.html">coap_session_t</a> <a class="el" href="structcoap__session__t.html">coap_session_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a53c0f7c2c9ea53e2abc29d308337d4a5" name="a53c0f7c2c9ea53e2abc29d308337d4a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53c0f7c2c9ea53e2abc29d308337d4a5">&#9670;&#160;</a></span>coap_session_type_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="coap__session_8h.html#a53c0f7c2c9ea53e2abc29d308337d4a5">coap_session_type_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8h_source.html#l00038">38</a> of file <a class="el" href="coap__session_8h_source.html">coap_session.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ad5332dde6300b189c007c2cfc7548de5" name="ad5332dde6300b189c007c2cfc7548de5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5332dde6300b189c007c2cfc7548de5">&#9670;&#160;</a></span>coap_endpoint_get_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_endpoint_get_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lookup the server session for the packet received on an endpoint, or create a new one. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">endpoint</td><td>Active endpoint the packet was received on. </td></tr>
    <tr><td class="paramname">packet</td><td>Received packet. </td></tr>
    <tr><td class="paramname">now</td><td>The current time in ticks. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The CoAP session. </dd></dl>

</div>
</div>
<a id="aa0e097f62e746144d8224a63678d14f4" name="aa0e097f62e746144d8224a63678d14f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0e097f62e746144d8224a63678d14f4">&#9670;&#160;</a></span>coap_endpoint_set_default_mtu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_endpoint_set_default_mtu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>mtu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the endpoint's default MTU. </p>
<p>This is the maximum message size that can be sent, excluding IP and UDP overhead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">endpoint</td><td>The CoAP endpoint. </td></tr>
    <tr><td class="paramname">mtu</td><td>maximum message size </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00896">896</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a157d58fe7840d7d7e36c40fff0825674" name="a157d58fe7840d7d7e36c40fff0825674"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a157d58fe7840d7d7e36c40fff0825674">&#9670;&#160;</a></span>coap_free_endpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_free_endpoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>ep</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00901">901</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a27368ba92c60da1c501408477b86735e" name="a27368ba92c60da1c501408477b86735e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27368ba92c60da1c501408477b86735e">&#9670;&#160;</a></span>coap_new_client_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00665">665</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aab88c1006da3287ef11ce5ecb249de1a" name="aab88c1006da3287ef11ce5ecb249de1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab88c1006da3287ef11ce5ecb249de1a">&#9670;&#160;</a></span>coap_new_client_session_pki()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session_pki </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcoap__dtls__pki__t.html">coap_dtls_pki_t</a> *&#160;</td>
          <td class="paramname"><em>setup_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server with PKI credentials. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>CoAP Protocol. </td></tr>
    <tr><td class="paramname">setup_data</td><td>PKI parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call <a class="el" href="coap__session_8h.html#a9aee135ba884d7c143b11bc42fd23e53" title="Decrement reference counter on a session.">coap_session_release()</a> to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00740">740</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aaad2073b08052ead81502b708d1c3df3" name="aaad2073b08052ead81502b708d1c3df3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaad2073b08052ead81502b708d1c3df3">&#9670;&#160;</a></span>coap_new_client_session_psk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session_psk </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>key_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server with PSK credentials. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol. </td></tr>
    <tr><td class="paramname">identity</td><td>PSK client identity </td></tr>
    <tr><td class="paramname">key</td><td>PSK shared key </td></tr>
    <tr><td class="paramname">key_len</td><td>PSK shared key length</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00680">680</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a05cb8f588768de5cabb83840c63ad746" name="a05cb8f588768de5cabb83840c63ad746"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05cb8f588768de5cabb83840c63ad746">&#9670;&#160;</a></span>coap_new_endpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> * coap_new_endpoint </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>listen_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new endpoint for communicating with peers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The coap context that will own the new endpoint </td></tr>
    <tr><td class="paramname">listen_addr</td><td>Address the endpoint will listen for incoming requests on or originate outgoing requests from. Use NULL to specify that no incoming request will be accepted and use a random endpoint. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol used on this endpoint </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00810">810</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a0aab9b027be5f2ab6858c5fd45d5903e" name="a0aab9b027be5f2ab6858c5fd45d5903e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0aab9b027be5f2ab6858c5fd45d5903e">&#9670;&#160;</a></span>coap_new_server_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_server_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>ep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new server session for the specified endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">ep</td><td>An endpoint where an incoming connection request is pending.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00780">780</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aa8b3a2da8480911b0216dad076038cb6" name="aa8b3a2da8480911b0216dad076038cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8b3a2da8480911b0216dad076038cb6">&#9670;&#160;</a></span>coap_session_connected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_connected </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session that it has just connected or reconnected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00326">326</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a0bbb4153c8efc0a5425990e24a541c5e" name="a0bbb4153c8efc0a5425990e24a541c5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bbb4153c8efc0a5425990e24a541c5e">&#9670;&#160;</a></span>coap_session_delay_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_delay_pdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcoap__queue__t.html">coap_queue_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00253">253</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ad3377d3198c10fa086502035ded9c268" name="ad3377d3198c10fa086502035ded9c268"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3377d3198c10fa086502035ded9c268">&#9670;&#160;</a></span>coap_session_disconnected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_disconnected </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a>&#160;</td>
          <td class="paramname"><em>reason</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session that it has failed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">reason</td><td>The reason why the session was disconnected. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00383">383</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab3d24595515d6f66805791a7f821d5e7" name="ab3d24595515d6f66805791a7f821d5e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3d24595515d6f66805791a7f821d5e7">&#9670;&#160;</a></span>coap_session_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00170">170</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ae9d572f48de8c2d3158222102221ddfe" name="ae9d572f48de8c2d3158222102221ddfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9d572f48de8c2d3158222102221ddfe">&#9670;&#160;</a></span>coap_session_get_ack_random_factor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> coap_session_get_ack_random_factor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP ack randomize factor. </p>
<p>A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current ack randomize value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00066">66</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9b7b3b2cc65d0f9f4affbfa76aaf6dac" name="a9b7b3b2cc65d0f9f4affbfa76aaf6dac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b7b3b2cc65d0f9f4affbfa76aaf6dac">&#9670;&#160;</a></span>coap_session_get_ack_timeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> coap_session_get_ack_timeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP initial ack response timeout before the next re-transmit. </p>
<p>Number of seconds when to expect an ACK or a response to an outstanding CON message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current ack response timeout value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00061">61</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="afaa81c523bab1519c3df5b06e7931f66" name="afaa81c523bab1519c3df5b06e7931f66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaa81c523bab1519c3df5b06e7931f66">&#9670;&#160;</a></span>coap_session_get_app_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * coap_session_get_app_data </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns any application-specific data that has been stored with <code>session</code> using the function <a class="el" href="coap__session_8h.html#a99e20f56b02256dc352cc48bdc04b778" title="Stores data with the given session.">coap_session_set_app_data()</a>. </p>
<p>This function will return <code>NULL</code> if no data has been stored. </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00094">94</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a7ad5e9a06810ee45664f88ab6523357c" name="a7ad5e9a06810ee45664f88ab6523357c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ad5e9a06810ee45664f88ab6523357c">&#9670;&#160;</a></span>coap_session_get_by_peer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_get_by_peer </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>remote_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ifindex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a495176d2531e846c1cda3961119df1c0" name="a495176d2531e846c1cda3961119df1c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a495176d2531e846c1cda3961119df1c0">&#9670;&#160;</a></span>coap_session_get_max_transmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int coap_session_get_max_transmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP maximum retransmit before failure. </p>
<p>Number of message retransmissions before message sending is stopped</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current maximum retransmit value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00056">56</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a4368ee622c681bf7cf0b7cfe99c8ab37" name="a4368ee622c681bf7cf0b7cfe99c8ab37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4368ee622c681bf7cf0b7cfe99c8ab37">&#9670;&#160;</a></span>coap_session_max_pdu_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_session_max_pdu_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get maximum acceptable PDU size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>maximum PDU size, not including header (but including token). </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00189">189</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab91ca670624ee770714727efff274c49" name="ab91ca670624ee770714727efff274c49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab91ca670624ee770714727efff274c49">&#9670;&#160;</a></span>coap_session_mfree()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_mfree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00147">147</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ae37bac62f8de2cecd968ec1c26eb23b4" name="ae37bac62f8de2cecd968ec1c26eb23b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae37bac62f8de2cecd968ec1c26eb23b4">&#9670;&#160;</a></span>coap_session_reference()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_reference </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increment reference counter on a session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>same as session </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00071">71</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9aee135ba884d7c143b11bc42fd23e53" name="a9aee135ba884d7c143b11bc42fd23e53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9aee135ba884d7c143b11bc42fd23e53">&#9670;&#160;</a></span>coap_session_release()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_release </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrement reference counter on a session. </p>
<p>Note that the session may be deleted as a result and should not be used after this call.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00077">77</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a43ad12697cacde3be9579f8253ca9ccf" name="a43ad12697cacde3be9579f8253ca9ccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43ad12697cacde3be9579f8253ca9ccf">&#9670;&#160;</a></span>coap_session_send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function interface for datagram data transmission. </p>
<p>This function returns the number of bytes that have been transmitted, or a value less than zero on error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send data on. </td></tr>
    <tr><td class="paramname">data</td><td>The data to send. </td></tr>
    <tr><td class="paramname">datalen</td><td>The actual length of <code>data</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written on success, or a value less than zero on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00218">218</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a2f455ec1572982a5ae404beac0cfbd53" name="a2f455ec1572982a5ae404beac0cfbd53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f455ec1572982a5ae404beac0cfbd53">&#9670;&#160;</a></span>coap_session_send_csm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_send_csm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session transport has just connected and CSM exchange can now start. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00290">290</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aaf20c9b0b2ad3168c15e535a67ea3ce5" name="aaf20c9b0b2ad3168c15e535a67ea3ce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf20c9b0b2ad3168c15e535a67ea3ce5">&#9670;&#160;</a></span>coap_session_send_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_send_pdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a pdu according to the session's protocol. </p>
<p>This function returns the number of bytes that have been transmitted, or a value less than zero on error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send pdu on. </td></tr>
    <tr><td class="paramname">pdu</td><td>The pdu to send.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written on success, or a value less than zero on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="net_8c_source.html#l00627">627</a> of file <a class="el" href="net_8c_source.html">net.c</a>.</p>

</div>
</div>
<a id="ab3f9f60c0a4857c147fef5721025944c" name="ab3f9f60c0a4857c147fef5721025944c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3f9f60c0a4857c147fef5721025944c">&#9670;&#160;</a></span>coap_session_send_ping()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a> coap_session_send_ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a ping message for the session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>COAP_INVALID_TID if there is an error </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00316">316</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a45feb3b133d2673839723a8ecf6d547c" name="a45feb3b133d2673839723a8ecf6d547c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45feb3b133d2673839723a8ecf6d547c">&#9670;&#160;</a></span>coap_session_set_ack_random_factor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_ack_random_factor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP ack randomize factor. </p>
<p>A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 1.5 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00045">45</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9b9cd625815481afa130fa086362dfe1" name="a9b9cd625815481afa130fa086362dfe1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b9cd625815481afa130fa086362dfe1">&#9670;&#160;</a></span>coap_session_set_ack_timeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_ack_timeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP initial ack response timeout before the next re-transmit. </p>
<p>Number of seconds when to expect an ACK or a response to an outstanding CON message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 2 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00035">35</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a99e20f56b02256dc352cc48bdc04b778" name="a99e20f56b02256dc352cc48bdc04b778"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99e20f56b02256dc352cc48bdc04b778">&#9670;&#160;</a></span>coap_session_set_app_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_app_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stores <code>data</code> with the given session. </p>
<p>This function overwrites any value that has previously been stored with <code>session</code>. </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00088">88</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a0292e90d1449f26885194c9efb7d3a27" name="a0292e90d1449f26885194c9efb7d3a27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0292e90d1449f26885194c9efb7d3a27">&#9670;&#160;</a></span>coap_session_set_max_retransmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_max_retransmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP maximum retransmit count before failure. </p>
<p>Number of message retransmissions before message sending is stopped</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 4 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00026">26</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a23671937b7c384fb768ccd00cc39db45" name="a23671937b7c384fb768ccd00cc39db45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23671937b7c384fb768ccd00cc39db45">&#9670;&#160;</a></span>coap_session_set_mtu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_mtu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>mtu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the session MTU. </p>
<p>This is the maximum message size that can be sent, excluding IP and UDP overhead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">mtu</td><td>maximum message size </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00206">206</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="adb19e1f2544b8b01424fa2e9dce41e7b" name="adb19e1f2544b8b01424fa2e9dce41e7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb19e1f2544b8b01424fa2e9dce41e7b">&#9670;&#160;</a></span>coap_session_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function interface for stream data transmission. </p>
<p>This function returns the number of bytes that have been transmitted, or a value less than zero on error. The number of bytes written may be less than datalen because of congestion control.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send data on. </td></tr>
    <tr><td class="paramname">data</td><td>The data to send. </td></tr>
    <tr><td class="paramname">datalen</td><td>The actual length of <code>data</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written on success, or a value less than zero on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00239">239</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_a14d23a24002734ac2a3b997119f008e.html">coap2</a></li><li class="navelem"><a class="el" href="coap__session_8h.html">coap_session.h</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
